<?php 
/** @var TurnRow $turnRow */
$turnRow = $this->turn;

$turnEditUrl = $this->url(array('action' => 'turn', 'turn_id' => $turnRow->getId()));
$groupParserUrl = $this->url(array(
	'controller' => 'group-parser', 
	'action' => 'index', 
	'turn_id' => $turnRow->getId(),
	'group_id' => $turnRow->getGroupId(),
));

$times = $turnRow->getTimes();
$turnTimeCount = count($times);
?>

<a style='font-weight: bold; margin: 5px;' href='<?php echo $groupParserUrl; ?>'><?php echo $turnRow->getName(); ?></a>
<a href='<?php echo $turnEditUrl; ?>'><i class='icon-cog' style='cursor: pointer;'></i></a>
<br />
<?php echo $turnTimeCount; ?> постов в день.<br />
<?php 
if ($turnRow->isStay()) {
	echo "Очередь простаивает";
} else {
	$time = $turnRow->whenStay();
	$delta = new Date_DeltaRussian("hours");
	echo "Последний пост через ";
	echo $delta->spellDelta(time(), $time);
}
?>

<br />
<br />
